import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/containers/index'
import WorkShop from '@/containers/workshop'

import Mine from '@/containers/mine'
// Mine start
import MineSettings from '@/containers/Mine/MineSettings'
import HelpFeedback from '@/containers/Mine/HelpFeedback'
import Login from '@/containers/Mine/Login'
import OnlineService from '@/containers/Mine/OnlineService'
import MineOrder from '@/containers/Mine/MineOrder'
import OrderDetails from '@/containers/Mine/OrderDetails'
import Information from '@/containers/Mine/Information'
import Basis from '@/containers/Mine/Basis'
// Mine end
import NotFound from '@/containers/NotFound'
//workshop start
import Details from '@/containers/Worksshop/Workshopdetails'
import Family from '@/containers/Worksshop/Minefamilymsg'
import Birthday from '@/containers/Worksshop/Minebirthdaymsg'
import Father from '@/containers/Worksshop/Minefathermsg'
import Chronic from '@/containers/Worksshop/Minechronicmsg'
import Mather from '@/containers/Worksshop/Minemathermsg'
import Test from '@/containers/Worksshop/Minetestmsg'
import Simplen from '@/containers/Worksshop/Minesimplenmsg'
import Major from '@/containers/Worksshop/Minemajormsg'
//workshop end


// Index Start
import LungTest from '@/containers/Index/LungTest'
import DailyDiet from '@/containers/Index/DailyDiet'
import TestPapers from '@/containers/Index/TestPapers'
import TestResult from '@/containers/Index/TestResult'
import IndexParticulars from '@/containers/Index/IndexParticulars'
import MineRegister from '@/containers/Index/MineRegister'
import RetrievePassword from '@/containers/Index/RetrievePassword'
import ResetPassword from '@/containers/Index/ResetPassword'
import Message from '@/containers/Index/Message'
// Index End

//personal--zqs
import Personal from '@/containers/personal'
import RecordSymptom from '@/containers/Personal/recordsymptom.vue'
import Record from '@/components/Personal/Record/record.vue'
import Symptom from '@/components/Personal/Record/symptom.vue'

//Cart--zqs
import Cart from '@/containers/Cart'
import ConfirmOrder from '../containers/Cart/ConfirmOrder.vue'
//address--zqs
import Address from '@/containers/Cart/address.vue'
import NewAdderss from '@/containers/Cart/newadderss.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/index'
    },
    {
      path: '/index',
      name: 'Index',
      component: Index
    },
    {
      path: '/workshop',
       name: 'WorkShop',
      component: WorkShop
    },
    {
      path: '/personal',
      name: 'Personal',
      component: Personal,
    },
    {
      path: '/mine',
      name: 'Mine',
      component: Mine
    },
    {
      path: '/cart',   //购物车
      name: 'Cart',
      component: Cart
    },
    {
      path:'/confirmorder',   //确认订单
      name:'ConfirmOrder',
      component:ConfirmOrder
    },
    // Mine start
    {
      path: '/settings',
      name: 'MineSettings',
      component: MineSettings
    },
    {
      path: '/help',
      name: 'HelpFeedback',
      component: HelpFeedback
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/online',
      name: 'OnlineService',
      component: OnlineService
    },
    {
      path: '/order',
      name: 'MineOrder',
      component: MineOrder
    },
    {
      path: '/odetails/:id',
      name: 'OrderDetails',
      component: OrderDetails
    },
    {
      path: '/information',
      name: 'Information',
      component: Information
    },
    {
      path: '/basis',
      name: 'Basis',
      component: Basis
    },
    // Mine end
    //Personal--zqs
    {
      path: '/recordsymptom',
      name: 'RecordSymptom',
      component: RecordSymptom,
      redirect:'/RecordSymptom/record',
      children:[
        {
          path:'record',
          component:Record
        },
        {
          path:'symptom',
          component:Symptom
        }
      ]
    },
    //Personal--end--zqs
    {
      path: '*',
      component: NotFound
    },
    //workshop创建的路由
    {
      path: '/details',
      name: 'Details',
      component: Details
    },
    {
      path: '/family',
      name: 'Family',
      component: Family
    },
    {
      path: '/birthday',
      name: 'Birthday',
      component: Birthday
    },
    {
      path: '/father',
      name: 'Father',
      component: Father
    },
    {
      path: '/chronic',
      name: 'Chronic',
      component: Chronic
    },
    {
      path: '/mather',
      name: 'Mather',
      component: Mather
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    },
    {
      path: '/simplen',
      name: 'Simplen',
      component: Simplen
    },
    {
      path: '/major',
      name: 'Major',
      component: Major
    },

    //workshop创建的路由
    // Index Start
    {
      path: '/lungtest', // 肺部测试开始
      name: 'LungTest',
      component: LungTest
    },
    {
      path: '/dailydiet', // 每日食谱
      name: 'DailyDiet',
      component: DailyDiet
    },
    {
      path: '/testpapers', // 肺部测试题
      name: 'TestPapers',
      component: TestPapers
    },
    {
      path: '/testresult', // 肺部测试结果
      name: 'TestResult',
      component: TestResult
    },
    {
      path: '/particulars', // 首页详情||话题
      name: 'IndexParticulars',
      component: IndexParticulars
    },
    {
      path: '/register', // 我的注册
      name: 'MineRegister',
      component: MineRegister
    },
    {
      path: '/retrieve', // 找回密码
      name: 'RetrievePassword',
      component: RetrievePassword
    },
    {
      path: '/reset', // 重置密码
      name: 'ResetPassword',
      component: ResetPassword
    },
    {
      path: '/message', // 消息列表
      name: 'Message',
      component: Message
    },
    // Index End
    //address
    {
      path: '/address', // 地址
      name: 'Address',
      component: Address
    },
    {
      path:'/newadderss', // 新增地址
      name:'NewAdderss',
      component:NewAdderss
    }
  ]
})
